package com.ms.p2p.bean;

import com.ms.p2p.entity.system.RbacRole;

import java.io.Serializable;
import java.util.List;

/**
 * Created by xing_ on 2017/5/27.
 */
public class MenuItem  implements Serializable {
    private String pid;
    private String text;
    private String id;
    private Boolean collapsed = false;
    private String href;
    private List<MenuItem> items;

    public MenuItem() {
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public MenuItem(String text, String id, String href,String pid) {
        this.text = text;
        this.id = id;
        this.href = href;
        this.pid = pid;
    }

    public MenuItem(RbacRole role) {
        this.text = role.getName();
        this.id = role.getId() + "";
        this.href = role.getUrl();
        this.pid = role.getPid()+"";
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Boolean getCollapsed() {
        return collapsed;
    }

    public void setCollapsed(Boolean collapsed) {
        this.collapsed = collapsed;
    }

    public List<MenuItem> getItems() {
        return items;
    }

    public void setItems(List<MenuItem> items) {
        this.items = items;
    }
}
